/*CopyRight 2015 By YXKJ Co., Ltd. All Rights Reserved.*/
package com.yx.ehis.service;

import java.io.Serializable;
import java.util.List;

/**
 * @author zgq
 */
public interface GeneralService {
	// ------------------------------BaseGeneralDAO------------------------------
	// public int count(ISearch arg0);

	public <T> T find(Class<T> arg0, Serializable arg1);

	public <T> T[] find(Class<T> arg0, Serializable... arg1);

	public <T> List<T> findAll(Class<T> arg0);

	public void flush();

	// public Filter getFilterFromExample(Object arg0);

	// public Filter getFilterFromExample(Object arg0, ExampleOptions arg1);

	public <T> T getReference(Class<T> arg0, Serializable arg1);

	public <T> T[] getReferences(Class<T> arg0, Serializable... arg1);

	public boolean isAttached(Object arg0);

	public void refresh(Object... arg0);

	public boolean remove(Object arg0);

	public void remove(Object... arg0);

	public boolean removeById(Class<?> arg0, Serializable arg1);

	public void removeByIds(Class<?> arg0, Serializable... arg1);

	public boolean save(Object arg0);

	public boolean[] save(Object... arg0);

	// public List<?> search(ISearch arg0);

	// public SearchResult<?> searchAndCount(ISearch arg0);

	// public Object searchUnique(ISearch arg0);

	// ------------------------------OriginalGeneralDAO------------------------------
	public void create(Object arg0);

	public boolean createOrUpdate(Object arg0);

	public boolean deleteById(Class<?> arg0, Serializable arg1);

	public boolean deleteEntity(Object arg0);

	public <T> T fetch(Class<T> arg0, Serializable arg1);

	public <T> List<T> fetchAll(Class<T> arg0);

	public boolean isConnected(Object arg0);

	public void refresh(Object arg0);

	public void update(Object arg0);

	// ------------------------------JpaGeneralDAO------------------------------
	public <T> T merge(T arg0);

	public Object[] merge(Object... arg0);

	public void persist(Object... arg0);
}
